package action;



import java.util.List;

import org.apache.struts2.ServletActionContext;

import biz.IUsedHouseBiz;

import com.opensymphony.xwork2.ActionSupport;

import entity.Usedhouse;

public class UsedHouseAction extends ActionSupport {
	private IUsedHouseBiz iub;
	private Usedhouse uh;
	public IUsedHouseBiz getIub() {
		return iub;
	}
	public void setIub(IUsedHouseBiz iub) {
		this.iub = iub;
	}
	public Usedhouse getUh() {
		return uh;
	}
	public void setUh(Usedhouse uh) {
		this.uh = uh;
	}
	
	public String findAllInput(){
		List<Usedhouse> listU=iub.findAllInput(uh);
		ServletActionContext.getRequest().setAttribute("listU",listU);
		return "infotype";
	}
	
	public String findAllUsedHouseId(){
		int UsedHouseId=Integer.parseInt(ServletActionContext.getRequest().getParameter("uhId"));
		Usedhouse uh=iub.findUsedhouseAllUsedHouseId(UsedHouseId);
		ServletActionContext.getRequest().setAttribute("uh", uh);
		return "show";
	}
}
